<?php
Yii::app()->clientScript->registerScript('RUN', "
$('#User_run').Rut({
   on_error: function(){ 
   $('#User_run').val('');
   alert('El rut ingresado es incorrecto');
  
 }
})
");?>

<div class="row">


<?php echo $form->labelEx($model,'nombres'); ?>


<?php echo $form->textField($model,'nombres',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'nombres'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'apellido_paterno'); ?>


<?php echo $form->textField($model,'apellido_paterno',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'apellido_paterno'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'apellido_materno'); ?>


<?php echo $form->textField($model,'apellido_materno',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'apellido_materno'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'run'); ?>


<?php echo $form->textField($model,'run',array('maxlength'=>12));?>


<?php echo $form->error($model,'run'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'username'); ?>


<?php echo $form->textField($model,'username',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'username'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'password'); ?>


<?php echo $form->passwordField($model,'password',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'password'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'activo'); ?>


<?php echo $form->dropDownList($model,'activo',array(1=>"Si",0=>"No")); ?>


<?php echo $form->error($model,'activo'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'email'); ?>


<?php echo $form->textField($model,'email',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'email'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'direccion'); ?>


<?php echo $form->textField($model,'direccion',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'direccion'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'telefono'); ?>


<?php echo $form->textField($model,'telefono'); ?>


<?php echo $form->error($model,'telefono'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'salud'); ?>


<?php echo $form->textField($model,'salud',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'salud'); ?>
</div>

<div class="row">


<?php echo $form->labelEx($model,'prevision'); ?>


<?php echo $form->textField($model,'prevision',array('size'=>45,'maxlength'=>45)); ?>


<?php echo $form->error($model,'prevision'); ?>
</div>

<div class="row">

	<?php echo $form->labelEx($model,'foto'); ?>

	<?php echo $form->fileField($model,'foto'); ?>

	<?php echo $form->error($model,'foto'); ?>
	</div>
